﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_panel_Thongkechitiet : System.Web.UI.Page
{
    public static int flag = -1;
    public List<tblDoanhNghiepTuNhan> listdn = null;
    public List<tblCoQuanNhaNuoc> listnn = null;
    BieumauDataContext _db = new BieumauDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["login_admin"] == null)
        {
            Response.Redirect("Index.aspx");

        }
        if (!IsPostBack)
        {
            
            dropnam.Items.Clear();
            dropnam.Items.Add("Chọn một năm");
            for (int i = 2013; i <=Convert.ToInt32(DateTime.Now.Year.ToString()); i++)
            {
                dropnam.Items.Add(i.ToString());
            }
        }
    }

    protected void change_radio(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            if (radGroup.SelectedIndex == 0)
            {
                flag = 0;
                try
                {
                    listdn = _db.tblDoanhNghiepTuNhans.ToList();
                }
                catch { }

            }
            if (radGroup.SelectedIndex == 1)
            {
                flag = 1;
                try
                {
                    listnn = _db.tblCoQuanNhaNuocs.ToList();
                }
                catch { }


            }
        }
        

    }
}